package a.j;

import javax.swing.*;
import javax.swing.event.MouseInputListener;
import java.awt.event.MouseEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;

public class gf
  implements MouseInputListener
{
  public static final String a = "active";
  public static final String b = "child";
  public static final String c = "activeView";
  public static final String d = "grabFocusEnabled";
  public static final String e = "parent";
  public static final String f = "name";
  public static final String g = "modifierMask";
  public static final String h = "editing";
  protected pg i;
  protected int j;
  protected int k;
  private int l;
  private int n;
  private boolean o;
  private boolean p;
  private boolean q;
  private int r = 1;
  protected MouseEvent s;
  protected MouseEvent t;
  protected MouseEvent u;
  protected MouseEvent v;
  protected MouseEvent w;
  private sc x;
  private String y;
  private gf z = null;
  private gf A;
  private boolean B = false;
  private boolean C = true;
  private boolean D;
  private PropertyChangeSupport E;
  public static int F;
  
  public gf() {}
  
  public gf(df paramdf)
  {
    this();
    if ((bool) || (paramdf != null))
    {
      ze localze = paramdf.e();
      this.i = null;
      if (((bool) || (localze != null)) && ((localze instanceof pg))) {
        this.i = ((pg)localze);
      }
    }
  }
  
  public void a(PropertyChangeListener paramPropertyChangeListener)
  {
    if (!ld.E) {
      if (this.E == null) {
        this.E = new PropertyChangeSupport(this);
      }
    }
    this.E.addPropertyChangeListener(paramPropertyChangeListener);
  }
  
  public void a(String paramString, PropertyChangeListener paramPropertyChangeListener)
  {
    if (!ld.E) {
      if (this.E == null) {
        this.E = new PropertyChangeSupport(this);
      }
    }
    this.E.addPropertyChangeListener(paramString, paramPropertyChangeListener);
  }
  
  public void b(PropertyChangeListener paramPropertyChangeListener)
  {
    if ((ld.E) || (this.E != null)) {
      this.E.removePropertyChangeListener(paramPropertyChangeListener);
    }
  }
  
  public void b(String paramString, PropertyChangeListener paramPropertyChangeListener)
  {
    if ((ld.E) || (this.E != null)) {
      this.E.removePropertyChangeListener(paramString, paramPropertyChangeListener);
    }
  }
  
  protected void a(String paramString, Object paramObject1, Object paramObject2)
  {
    if ((ld.E) || (this.E != null)) {
      this.E.firePropertyChange(paramString, paramObject1, paramObject2);
    }
  }
  
  protected void a(String paramString, boolean paramBoolean1, boolean paramBoolean2)
  {
    if ((ld.E) || (this.E != null)) {
      this.E.firePropertyChange(paramString, paramBoolean1, paramBoolean2);
    }
  }
  
  protected void a(String paramString, int paramInt1, int paramInt2)
  {
    if ((ld.E) || (this.E != null)) {
      this.E.firePropertyChange(paramString, paramInt1, paramInt2);
    }
  }
  
  public boolean a()
  {
    return this.p;
  }
  
  protected void a(boolean paramBoolean)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (this.p != paramBoolean) {
        this.p = paramBoolean;
      }
    }
    else
    {
      if (!bool) {}
      a("editing", !paramBoolean, paramBoolean);
    }
  }
  
  public void b()
    throws UnsupportedOperationException
  {
    if ((ld.E) || (a())) {
      a(false);
    }
  }
  
  public void a(pg parampg)
  {
    pg localpg = this.i;
    if (!ld.E)
    {
      if (localpg != parampg) {
        this.i = parampg;
      }
    }
    else {
      a("activeView", localpg, parampg);
    }
  }
  
  public void b(boolean paramBoolean)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (this.D != paramBoolean) {
        this.D = paramBoolean;
      }
    }
    else
    {
      if (!bool) {}
      a("active", !paramBoolean, paramBoolean);
    }
  }
  
  public boolean c()
  {
    return this.D;
  }
  
  public void c(boolean paramBoolean)
  {
    j().e(paramBoolean);
  }
  
  public boolean d()
  {
    return j().v();
  }
  
  public void d(boolean paramBoolean)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (this.C != paramBoolean) {
        this.C = paramBoolean;
      }
    }
    else
    {
      if (!bool) {}
      a("grabFocusEnabled", !paramBoolean, paramBoolean);
    }
  }
  
  public boolean e()
  {
    return this.C;
  }
  
  public void a(gf paramgf, MouseEvent paramMouseEvent1, MouseEvent paramMouseEvent2)
  {
    a(paramgf, paramMouseEvent1, paramMouseEvent2, null);
  }
  
  public void a(gf paramgf, MouseEvent paramMouseEvent1, MouseEvent paramMouseEvent2, MouseEvent paramMouseEvent3)
  {
    boolean bool = ld.E;
    gf localgf = this.z;
    if (!bool) {
      if (paramgf != null)
      {
        if (!bool)
        {
          if (localgf != paramgf)
          {
            if (bool) {
              break label75;
            }
            if (localgf != null) {
              a(localgf);
            }
          }
          paramgf.a(this.i);
          paramgf.b(this);
          paramgf.a(m());
          this.z = paramgf;
          label75:
          if (bool) {}
        }
        else
        {
          if (localgf != paramgf) {
            a("child", localgf, paramgf);
          }
          paramgf.f();
        }
        paramgf.b(true);
        if (!bool) {
          if (paramMouseEvent1 != null) {
            paramgf.mousePressed(paramMouseEvent1);
          }
        }
        if (!bool) {
          if (paramMouseEvent2 != null) {
            paramgf.mouseDragged(paramMouseEvent2);
          }
        }
        if (paramMouseEvent3 == null) {
          return;
        }
        if (bool) {
          break label154;
        }
        paramgf.mouseReleased(paramMouseEvent3);
        if (!ld.D) {
          return;
        }
      }
    }
    label154:
    if (!bool)
    {
      if (localgf != null) {
        a(localgf);
      }
      this.z = null;
    }
    if ((bool) || (localgf != paramgf)) {
      a("child", localgf, paramgf);
    }
  }
  
  protected void a(gf paramgf)
  {
    boolean bool = ld.E;
    if ((bool) || (paramgf != null))
    {
      if (!bool)
      {
        if (paramgf.a()) {
          paramgf.b();
        }
        paramgf.b(false);
      }
      paramgf.b(null);
    }
  }
  
  public void f() {}
  
  public void g()
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (a()) {
        b();
      }
      if (bool) {}
    }
    else if (n())
    {
      e(false);
      if (bool) {
        break label59;
      }
      this.i.f().c();
      if (!ld.D) {
        return;
      }
    }
    label59:
    if (!bool) {
      if (this.A == null) {
        return;
      }
    }
    this.A.a(null, null, null);
  }
  
  public void b(gf paramgf)
  {
    if ((ld.E) || (this.A != paramgf))
    {
      gf localgf = this.A;
      this.A = paramgf;
      a("parent", localgf, this.A);
    }
  }
  
  public gf h()
  {
    return this.A;
  }
  
  public gf i()
  {
    return this.z;
  }
  
  public void mousePressed(MouseEvent paramMouseEvent)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2) {
      if (this.z != null)
      {
        this.z.mousePressed(paramMouseEvent);
        if (bool2) {
          break label49;
        }
        if (!bool1) {
          return;
        }
      }
    }
    if (!bool2)
    {
      if (e()) {
        label49:
        this.i.requestFocus();
      }
      this.s = paramMouseEvent;
      this.l = (this.j = paramMouseEvent.getX());
      this.n = (this.k = paramMouseEvent.getY());
      this.o = true;
    }
    og localog = j();
    double d1 = localog.c(paramMouseEvent.getX());
    double d2 = localog.d(paramMouseEvent.getY());
    f(false);
    if (!bool2)
    {
      if (!paramMouseEvent.isPopupTrigger())
      {
        if (bool2) {
          break label206;
        }
        if (!SwingUtilities.isRightMouseButton(paramMouseEvent)) {}
      }
      else
      {
        f(true);
      }
    }
    else
    {
      if (!bool2) {
        if (b(paramMouseEvent))
        {
          mouseShiftPressedRight(d1, d2);
          if (!bool2) {
            if (!bool1) {
              return;
            }
          }
        }
        else
        {
          mousePressedRight(d1, d2);
        }
      }
      if ((!bool2) && (!bool1)) {
        return;
      }
    }
    label206:
    if (!bool2) {
      if (SwingUtilities.isLeftMouseButton(paramMouseEvent))
      {
        if (!bool2) {
          if (b(paramMouseEvent))
          {
            mouseShiftPressedLeft(d1, d2);
            if (!bool2) {
              if (!bool1) {
                return;
              }
            }
          }
          else
          {
            mousePressedLeft(d1, d2);
          }
        }
        if ((!bool2) && (!bool1)) {
          return;
        }
      }
    }
    if (!bool2)
    {
      if (!SwingUtilities.isMiddleMouseButton(paramMouseEvent)) {
        return;
      }
      if (bool2) {}
    }
    else if (b(paramMouseEvent))
    {
      if (bool2) {
        break label307;
      }
      mouseShiftPressedMiddle(d1, d2);
      if (!bool1) {
        return;
      }
    }
    label307:
    mousePressedMiddle(d1, d2);
  }
  
  public void mouseReleased(MouseEvent paramMouseEvent)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    this.v = paramMouseEvent;
    if (!bool2) {
      if (this.z != null)
      {
        this.z.mouseReleased(paramMouseEvent);
        if (!bool2) {
          if (!bool1) {
            return;
          }
        }
      }
      else
      {
        this.j = paramMouseEvent.getX();
        this.k = paramMouseEvent.getY();
      }
    }
    og localog = j();
    double d1 = localog.c(paramMouseEvent.getX());
    double d2 = localog.d(paramMouseEvent.getY());
    mouseReleased(d1, d2);
    if (!bool2)
    {
      if (!paramMouseEvent.isPopupTrigger())
      {
        if (bool2) {
          break label140;
        }
        if (!SwingUtilities.isRightMouseButton(paramMouseEvent))
        {
          if (bool2) {
            break label186;
          }
          if (!p()) {
            break label182;
          }
        }
      }
      if (bool2) {
        break label161;
      }
    }
    if (b(paramMouseEvent))
    {
      label140:
      mouseShiftReleasedRight(d1, d2);
      if (bool2) {
        break label174;
      }
      if (!bool1) {}
    }
    else
    {
      label161:
      mouseReleasedRight(d1, d2);
    }
    f(false);
    label174:
    if ((bool2) || (bool1))
    {
      label182:
      label186:
      if (!bool2) {
        if (SwingUtilities.isLeftMouseButton(paramMouseEvent))
        {
          if (!bool2) {
            if (b(paramMouseEvent))
            {
              mouseShiftReleasedLeft(d1, d2);
              if (!bool2) {
                if (!bool1) {
                  return;
                }
              }
            }
            else
            {
              mouseReleasedLeft(d1, d2);
            }
          }
          if ((!bool2) && (!bool1)) {
            return;
          }
        }
      }
      if (!bool2)
      {
        if (!SwingUtilities.isMiddleMouseButton(paramMouseEvent)) {
          return;
        }
        if (bool2) {}
      }
      else if (b(paramMouseEvent))
      {
        if (bool2) {
          break label287;
        }
        mouseShiftReleasedMiddle(d1, d2);
        if (!bool1) {
          return;
        }
      }
      mouseReleasedMiddle(d1, d2);
    }
    label287:
  }
  
  public void mouseClicked(MouseEvent paramMouseEvent)
  {
    boolean bool = ld.E;
    if (!bool) {
      if (this.z != null)
      {
        this.z.mouseClicked(paramMouseEvent);
        if (!bool) {
          if (!ld.D) {
            return;
          }
        }
      }
      else
      {
        this.j = paramMouseEvent.getX();
        this.k = paramMouseEvent.getY();
      }
    }
    og localog = j();
    double d1 = localog.c(paramMouseEvent.getX());
    double d2 = localog.d(paramMouseEvent.getY());
    this.w = paramMouseEvent;
    mouseClicked(d1, d2);
  }
  
  public void mouseDragged(MouseEvent paramMouseEvent)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    this.t = paramMouseEvent;
    if (!bool2) {
      if (this.z != null)
      {
        this.z.mouseDragged(paramMouseEvent);
        if (bool2) {
          break label62;
        }
        if (!bool1) {
          return;
        }
      }
    }
    if (!bool2)
    {
      if (!a(paramMouseEvent.getX(), paramMouseEvent.getY()))
      {
        label62:
        this.o = false;
        this.j = paramMouseEvent.getX();
      }
    }
    else
    {
      this.k = paramMouseEvent.getY();
      og localog = j();
      double d1 = localog.c(paramMouseEvent.getX());
      double d2 = localog.d(paramMouseEvent.getY());
      if (!bool2) {
        if (SwingUtilities.isRightMouseButton(paramMouseEvent))
        {
          mouseDraggedRight(d1, d2);
          if ((!bool2) && (!bool1)) {
            return;
          }
        }
      }
      if (!bool2) {
        if (SwingUtilities.isLeftMouseButton(paramMouseEvent)) {
          mouseDraggedLeft(d1, d2);
        }
      }
      if ((bool2) || ((bool1) && (SwingUtilities.isMiddleMouseButton(paramMouseEvent)))) {
        mouseDraggedMiddle(d1, d2);
      }
    }
  }
  
  public void mouseMoved(MouseEvent paramMouseEvent)
  {
    boolean bool = ld.E;
    if (!bool) {
      if (this.z != null)
      {
        this.z.mouseMoved(paramMouseEvent);
        if (!bool) {
          if (!ld.D) {
            return;
          }
        }
      }
      else
      {
        this.j = paramMouseEvent.getX();
        this.k = paramMouseEvent.getY();
      }
    }
    og localog = j();
    double d1 = localog.c(paramMouseEvent.getX());
    double d2 = localog.d(paramMouseEvent.getY());
    this.u = paramMouseEvent;
    mouseMoved(d1, d2);
  }
  
  public void mouseEntered(MouseEvent paramMouseEvent)
  {
    if ((ld.E) || (this.z != null)) {
      this.z.mouseEntered(paramMouseEvent);
    }
  }
  
  public void mouseExited(MouseEvent paramMouseEvent)
  {
    if ((ld.E) || (this.z != null)) {
      this.z.mouseExited(paramMouseEvent);
    }
  }
  
  protected double a(double paramDouble)
  {
    if (!ld.E) {
      if (!d()) {
        return paramDouble;
      }
    }
    double d1 = j().x();
    return Math.floor(paramDouble / d1 + 0.5D) * d1;
  }
  
  protected double b(double paramDouble)
  {
    if (!ld.E) {
      if (!d()) {
        return paramDouble;
      }
    }
    double d1 = j().x();
    return Math.floor(paramDouble / d1 + 0.5D) * d1;
  }
  
  og j()
  {
    return this.i.C();
  }
  
  protected g k()
  {
    return this.i.a();
  }
  
  protected double a(int paramInt)
  {
    return j().c(paramInt);
  }
  
  protected double b(int paramInt)
  {
    return j().d(paramInt);
  }
  
  public void a(String paramString)
  {
    boolean bool = ld.E;
    if (((bool) || (paramString != this.y)) && ((bool) || ((this.y == null) || ((bool) || (!this.y.equals(paramString))))))
    {
      String str = this.y;
      this.y = paramString;
      a("name", str, this.y);
    }
  }
  
  public String l()
  {
    return this.y;
  }
  
  sc a(double paramDouble1, double paramDouble2, boolean paramBoolean)
  {
    return this.i.P().a(paramDouble1, paramDouble2, -1, paramBoolean);
  }
  
  sc a(double paramDouble1, double paramDouble2, int paramInt, boolean paramBoolean)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2) {}
    int m;
    switch (paramInt)
    {
    case 0: 
      m = 4;
      if (!bool2) {
        if (!bool1) {
          break label178;
        }
      }
    case 1: 
      m = 8;
      if (!bool2) {
        if (!bool1) {
          break label178;
        }
      }
    case 2: 
      m = 32;
      if (!bool2) {
        if (!bool1) {
          break label178;
        }
      }
    case 3: 
      m = 2;
      if (!bool2) {
        if (!bool1) {
          break label178;
        }
      }
    case 4: 
      m = 1;
      if (!bool2) {
        if (!bool1) {
          break label178;
        }
      }
    case 5: 
      m = 16;
      if (!bool2) {
        if (!bool1) {
          break label178;
        }
      }
    case 6: 
      m = 64;
      if (!bool1) {
        break label178;
      }
    }
    throw new IllegalArgumentException("unknown type: " + paramInt);
    label178:
    return this.i.P().a(paramDouble1, paramDouble2, m, paramBoolean);
  }
  
  protected sc a(MouseEvent paramMouseEvent)
  {
    return a(a(paramMouseEvent.getX()), b(paramMouseEvent.getY()));
  }
  
  protected sc a(double paramDouble1, double paramDouble2)
  {
    this.x = a(paramDouble1, paramDouble2, true);
    return this.x;
  }
  
  protected sc m()
  {
    return this.x;
  }
  
  public void a(sc paramsc)
  {
    this.x = paramsc;
  }
  
  public void mousePressedLeft(double paramDouble1, double paramDouble2) {}
  
  public void mouseShiftPressedLeft(double paramDouble1, double paramDouble2)
  {
    mousePressedLeft(paramDouble1, paramDouble2);
  }
  
  public void mouseShiftPressedRight(double paramDouble1, double paramDouble2)
  {
    mousePressedRight(paramDouble1, paramDouble2);
  }
  
  public void mouseShiftPressedMiddle(double paramDouble1, double paramDouble2)
  {
    mousePressedMiddle(paramDouble1, paramDouble2);
  }
  
  public void mousePressedMiddle(double paramDouble1, double paramDouble2) {}
  
  public void mousePressedRight(double paramDouble1, double paramDouble2) {}
  
  public void mouseReleased(double paramDouble1, double paramDouble2) {}
  
  public void mouseReleasedLeft(double paramDouble1, double paramDouble2) {}
  
  public void mouseShiftReleasedLeft(double paramDouble1, double paramDouble2)
  {
    mouseReleasedLeft(paramDouble1, paramDouble2);
  }
  
  public void mouseShiftReleasedRight(double paramDouble1, double paramDouble2)
  {
    mouseReleasedRight(paramDouble1, paramDouble2);
  }
  
  public void mouseReleasedMiddle(double paramDouble1, double paramDouble2) {}
  
  public void mouseShiftReleasedMiddle(double paramDouble1, double paramDouble2)
  {
    mouseReleasedMiddle(paramDouble1, paramDouble2);
  }
  
  public void mouseReleasedRight(double paramDouble1, double paramDouble2) {}
  
  public void mouseDraggedLeft(double paramDouble1, double paramDouble2) {}
  
  public void mouseDraggedMiddle(double paramDouble1, double paramDouble2) {}
  
  public void mouseDraggedRight(double paramDouble1, double paramDouble2) {}
  
  public void mouseClicked(double paramDouble1, double paramDouble2) {}
  
  public void mouseMoved(double paramDouble1, double paramDouble2) {}
  
  private boolean a(int paramInt1, int paramInt2)
  {
    boolean bool = ld.E;
    int m = paramInt1 - this.l;
    int i1 = paramInt2 - this.n;
    if ((bool) || (this.o)) {
      if (bool) {}
    }
    return m * m + i1 * i1 < 9;
  }
  
  protected boolean b(MouseEvent paramMouseEvent)
  {
    if (!ld.E) {}
    return (paramMouseEvent.getModifiers() & this.r) != 0;
  }
  
  void e(boolean paramBoolean)
  {
    this.B = paramBoolean;
  }
  
  boolean n()
  {
    return this.B;
  }
  
  public int o()
  {
    return this.r;
  }
  
  public void c(int paramInt)
  {
    int m = this.r;
    if (!ld.E)
    {
      if (m != paramInt) {
        this.r = paramInt;
      }
    }
    else {
      a("modifierMask", m, paramInt);
    }
  }
  
  private void f(boolean paramBoolean)
  {
    this.q = paramBoolean;
  }
  
  private boolean p()
  {
    return this.q;
  }
  
  public MouseEvent q()
  {
    return this.s;
  }
  
  public MouseEvent r()
  {
    return this.t;
  }
  
  public MouseEvent s()
  {
    return this.u;
  }
  
  public MouseEvent t()
  {
    return this.v;
  }
  
  public MouseEvent u()
  {
    return this.w;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.gf

 * JD-Core Version:    0.7.0.1

 */